Throwing an exception stops execution of the current function,
so the following return statements are both unnecessary and
unreachable.
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/606
}
addTo(stage) {
- if (this._stage !== undefined) {
+ if (this._stage !== undefined)
throw new Error('Ripples already added');
- return;
- }
this._stage = stage;
this._stage.add_actor(this._ripple1);
}
playAnimation(x, y) {
- if (this._stage === undefined) {
+ if (this._stage === undefined)
throw new Error('Ripples not added');
- return;
- }
this._x = x;
this._y = y;